Skip to content

Add live reload for development - #12

Merged
rastermanden merged 1 commit into
mainfrom
claude/thirsty-noyce-f4321d
Apr 18, 2026
Merged

Add live reload for development#12
rastermanden merged 1 commit into
mainfrom
claude/thirsty-noyce-f4321d

Conversation

@rastermanden

Copy link
Copy Markdown
Owner

Summary

  • Switches the dev server from npx serve to browser-sync with polling enabled (--watchOptions.usePolling=true) for reliable file watching on Windows
  • Adds a small client-side polling script to index.html (localhost-only guard) that checks the ETag/Last-Modified header every second and reloads the page when a file changes — handles environments where browser-sync's native fs events don't fire

What changed

  • package.json — new start script using browser-sync
  • .claude/launch.json — same browser-sync config for the preview panel
  • index.html — ~10-line dev-only reload script before </body>

Reviewer notes

The client-side script is intentionally simple and fires only on localhost/127.0.0.1, so it has zero effect in production.

🤖 Generated with Claude Code

- Switch dev server from serve to browser-sync with polling enabled
- Add client-side ETag polling script to index.html (localhost-only) as a
  reliable fallback for environments where browser-sync file watching does
  not fire native fs events

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rastermanden
rastermanden merged commit 36e65a6 into main Apr 18, 2026
1 check passed
@rastermanden
rastermanden deleted the claude/thirsty-noyce-f4321d branch April 18, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant